package com.teampower.idea.dao.impl;

import java.util.List;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import com.teampower.idea.dao.SysFunctionsDao;

public class SysFunctionsDaoImp  extends HibernateDaoSupport implements SysFunctionsDao{
	
	//
	public List getAll(){
		String hql = "from SysFunctions as t where fatherid is null order by pageid asc";
		List list = this.getHibernateTemplate().find(hql);
		return list;
	}
	
	//
	public List getAll(String menid){
		String hql = "from SysFunctions as t where fatherid = '"+ menid +"' order by pageid desc";
		List list = this.getHibernateTemplate().find(hql);
		return list;
	}
    
}
